package com.ygqh.baby.service.pay.app.weixin;

import java.util.ResourceBundle;

import com.foxinmy.weixin4j.model.WeixinAccount;
import com.foxinmy.weixin4j.model.WeixinPayAccount;

public class WxAppUtils {

	public final static WeixinPayAccount wxAppPayAccount;
	public final static WeixinAccount wxAppAccount;

	public final static String wxAppCertUrl;
	public final static String wxPayNotifyUrl;
	static {
		ResourceBundle WX_BUNDLE = ResourceBundle.getBundle("prop/pay");

		// 公用配置
		wxPayNotifyUrl = WX_BUNDLE.getString("app.wx.pay.notifyUrl");

		// android配置
		String appId = WX_BUNDLE.getString("app.wx.appid");
		String appSecret = WX_BUNDLE.getString("app.wx.appsecret");
		String paySignKey = WX_BUNDLE.getString("app.wx.paysignkey");
		String mchId = WX_BUNDLE.getString("app.wx.mchid");
		wxAppCertUrl = WX_BUNDLE.getString("app.wx.cert");

		wxAppPayAccount = new WeixinPayAccount(appId, appSecret, paySignKey, mchId);
		wxAppAccount = new WeixinAccount(appId, appSecret);
	}


}
